module.exports = {
    open: false,
    description: '添加卡片为精选',
    handler(req,res,next){
        let doc = req.body;
        let id = doc._id;
        let selectedCardID = doc.selectedCardID;
        req.mongo.collection("strategy").updateOne({_id:id},{$pull:{selectedCards:selectedCardID}},(e,r)=>{
            if(e) return res.err.mongoError(e);
            if(r.modifiedCount===0) return res.reply({code:1,message:"未查到此数据！"})
            return res.reply({code:0,message:"操作成功！"})
        })
    }
};
